package ch1;

public class Zuoye03106 {
    public static void main(String[] args) {
        int b=0;
        for (int i=1;b<=1500;i++){
            if (i%2==0||i%3==0||i%5==0||i==1&&i%7!=0){
                b++;
                System.out.print(i+" ");
                 if (b%10==0) {
                    System.out.println();
                }
            }
        }
    }
}
